<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>考核列表</title>
		<link href="css/gl/khlist.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="script/jquery/jquery-1.5.1.min.js">
</script>
		<script type="text/javascript" src="script/util.js">
</script>
		<script type="text/javascript" src="script/gl/khlist.js">
</script>
		<script type="text/javascript">
var totalCount=${model.totalRecords};//总记录数	  
var currentPage=${model.pageNo};//当前页
var pageCount=${model.totalPages};
function error(){
  if("${delresult }".length>0){
	  alert("${delresult }");
  }
}
</script>
	</head>

	<body onload="error();">
		<div id="page_all">
			<jsp:include page="title.jsp" flush="true">
				<jsp:param name="jspName" value="khModuleOpt" />
			</jsp:include>
			<div id="main">
				<div id="tgleft">
					<jsp:include page="khleft.jsp" flush="true">
						<jsp:param name="jspName" value="khlist" />
					</jsp:include>
				</div>
				<div id="tgmain">
				    <c:set var="now" value="<%=new java.util.Date()%>"/>
				    
					<table id="addnotice" cellpadding="0" cellspacing="0">
						<tr class="title">
							<td>序号</td>
							<td>考核名称</td>
							<td>开始时间</td>
							<td>结束时间</td>
							<td>详情</td>
							<td>编辑</td>
						</tr>
						<tbody id="ttbody">
						<c:if test="${!empty model.list}">
						    <c:forEach items="${model.list }" var="exam" varStatus="ss">
                         <tr>
					         <td style="width: 40px;">
								${(model.pageNo-1)*model.pageSize+ss.count }
					         </td>
							<td style="width: 250px;">
							    ${exam.name }
							</td>
							<td style="width: 100px;">
							  <fmt:formatDate value="${exam.starttime }" type="date"/>
							</td>
							<td style="width: 100px;">
							  <fmt:formatDate value="${exam.endtime }" type="date"/>
							</td>
							<td style="">
							<a style="color:#276867;" href="gl/khdetail.do?id=${exam.id }">点击查看考核详情</a>
							</td>
							<td style="width: 100px;">
							  <table class="intable">
							  <c:if test="${exam.starttime<now }">
                                <tr>
							     <td style="border: 0px;padding-top:2px;padding-right:13px;">
							       <input type="checkbox" value="0" disabled="disabled">
							     </td>
							     <td style="border: 0px;">
							       <a href="javascript:alert('考核已过期！');return flase;">
							         <img alt="删除" src="img/gl/10.jpg" style="border:0px"/>
							       </a>
							     </td>
							   </tr>
                              </c:if>
                              <c:if test="${exam.starttime>now }">
                                <tr>
							     <td style="border: 0px;padding-top:2px;padding-right:13px;">
							       <input type="checkbox" value="${exam.id }">
							     </td>
							     <td style="border: 0px;">
							         <img alt="删除" src="img/gl/10.jpg" class="button" onclick="Delete(${model.pageNo},${exam.id})"/>
							     </td>
							   </tr>
                              </c:if>
							  </table>
							</td>
						 </tr>
						  </c:forEach>
						</c:if>
						</tbody>
						<tr class="title">
							<td colspan="6">
								<div id="deleteAll"
									style="width: 46px;height: 25px; float: right; padding-left: 1px; text-align: left;">
									<img alt="删除所选" src="img/gl/100.jpg" class="button"
										onclick="DelMore()" />
								</div>
								<div id="selectPanel"
									style="width: 100px; height: 18px; float: right; text-align: right; padding-right: 12px; margin-top: 2px;">
									全选
									<input id="checkedAll" type="checkbox">
								</div>
							</td>
						</tr>
					</table>

					<div id="pageinfo">
					  共计${model.totalRecords}条考核，当前第${model.pageNo}页，共${model.totalPages}页。
					</div>
					<div id="pager">
						<img id="fstPage" alt="首页" src="img/gl/13.jpg"
							class="button pager" style="margin-right: 5px;"
							onclick="ChangePage('fst')" />
						<img id="forePage" alt="上一页" src="img/gl/14.jpg"
							class="button pager" style="margin-right: 5px;"
							onclick="ChangePage('fore')" />
						<img id="nextPage" alt="下一页" src="img/gl/15.jpg"
							class="button pager" style="margin-right: 5px;"
							onclick="ChangePage('next')" />
						<div style="width: 100p;" class="pager" style="margin-right:5px;">
							转到
							<input id="gopage" style="width: 30px;" type="text" />
							页
						</div>
						<img alt="GO" src="img/gl/16.jpg" class="button pager"
							style="margin-right: 5px;" onclick="PageGo()" />
					</div>

				</div>
			</div>
			<div id="footer">
				<jsp:include page="footer.jsp" flush="true"></jsp:include>
			</div>
			<div id="large" style="position: absolute;">
            </div>
		</div>

		<form id="delmore" name="delmore" method="post" action="gl/khgl.do">
		    <input id="page" name="page" type="hidden" value="khlist">
			<input id="pageNo" name="pageNo" type="hidden" value="${model.pageNo}">
			<input id="delids" name="delids" type="hidden" value="">
		</form>

	</body>
</html>
